#ifndef WEATHER_H
#define WEATHER_H

#include <QWidget>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QJsonDocument >
#include <QJsonObject >
#include <QJsonArray>
#include <QStandardItemModel>
#include <QDebug>
#include <QPainter>

namespace Ui {
class weather;
}

class weather : public QWidget
{
    Q_OBJECT

public:
    explicit weather(QWidget *parent = nullptr);
    ~weather();
    void pareJson(QByteArray byteArray);
    void paintEvent(QPaintEvent *event);
public slots:
    void replyFinished(QNetworkReply *reply);


private slots:
    void on_pushButton_clicked();

private:
    Ui::weather *ui;
     QNetworkAccessManager *manager;
    QStandardItemModel * pModel;
    QString week;//星期
    QString ymd;//日期
    QString type;//天气
    QString high;//最高温度
    QString low;//最低温度
    QString fx;//风向
    QString fl;//风等级
};

#endif // WEATHER_H
